function get(url) {
	wx.showLoading({
		title: '加载中',
	})
	return new Promise((resolve, reject) => {
		wx.request({
			url, //仅为示例，并非真实的接口地址
			success: (res) => {
				wx.hideLoading(),
					resolve(res)
			}
		})
	})

}

function post(url) {
	wx.showLoading({
		title: '加载中',
	})
	return new Promise((resolve, reject) => {
		wx.request({
			url, //仅为示例，并非真实的接口地址
			method: "post",
			header: {
				'content-type': 'application/json' // 默认值
			},
			success: (res) => {
				wx.hideLoading(),
					resolve(res)
			}
		})
	})

}
export default {
	get,
	post
}
